package com.liukai.exam.service.impl;

import com.liukai.exam.pojo.ClassInfo;
import com.liukai.exam.mapper.ClassInfoMapper;
import com.liukai.exam.pojo.Schools;
import com.liukai.exam.service.IClassInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 班级信息表，存放学校，学院，专业，班级 服务实现类
 * </p>
 *
 * @author liu kai
 * @since 2021-02-01
 */
@Service
public class ClassInfoServiceImpl extends ServiceImpl<ClassInfoMapper, ClassInfo> implements IClassInfoService {

    @Autowired
    private ClassInfoMapper classInfoMapper;

    @Override
    public List<Schools> getAllSchools() {
        return classInfoMapper.getAllSchools();
    }

    /**
     * 根据班级编号获取班级信息
     * @param classId
     * @return
     */
    @Override
    public ClassInfo getClassInfoByClassId(Integer classId){
        return classInfoMapper.getClassInfoByClassId(classId);
    }

}
